home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / text / mac / faqs.410 < prev    next >
Encoding:
Text File  |  1996-02-12  |  27.9 KB  |  670 lines

  1. Frequently Asked Questions (FAQS);faqs.410
  2.  
  3.  
  4.  
  5.  
  6. Q10.  Are there any FTP sites with Objective C code?  Where?
  7.  
  8.  A10.  Yes.
  9.     There are NeXT related sites at
  10.      sonata.cc.purdue.edu
  11.      cs.orst.edu
  12.     And non-NeXT related sites at
  13.      ?
  14.  
  15.  
  16. Q11.  I'm an emacs junkie.  Are there any .el files somewhere to support
  17.     Objective-C?
  18.  
  19.  A11.  Yes.  Try sonata.cc.purdue.edu /pub/next/misc/objc.tar.Z
  20.  
  21.  
  22. Q12.  So show me a program, a simple example.
  23.  
  24.  A12.  See the companion file "A S[ia]mple Objective-C Program" or get
  25.     all of the code from music.sie.arizona.edu:pub/ObjC/Sample.tar.Z
  26.  
  27.  
  28. Q13.  What are Protocols?
  29.  
  30.  A13.  Protocols are an addition to (currently only NeXT's 3.0+ version of)
  31.     ObjC that allow you to organize related methods into groups
  32.     that form high-level behaviors.  This gives library builders
  33.     a tool to identify sets of standard protocols, independent of
  34.     the class hierarchy.  Protocols provide language support for
  35.     the reuse of design, whereas classes support the reuse of code.
  36.     Well designed protocols can help users of an application
  37.     framework when learning or designing new classes.  Here is a
  38.     simple protocol definition for archiving objects:
  39.  
  40.         @protocol Archiving
  41.         - read:(NXTypedStream *)stream;
  42.         - write:(NXTypedStream *)stream;
  43.         @end
  44.  
  45.     Once defined, protocols can be referenced in a class interface
  46.     as follows:
  47.  
  48.         // MyClass inherits from Object and
  49.         // conforms to the Archiving protocol
  50.         @interface MyClass : Object <Archiving>
  51.         @end
  52.  
  53.     Unlike copying methods to/from other class interfaces, any
  54.     incompatible change made to the protocol will immediately be
  55.     recognized by the compiler (the next time the class is
  56.     compiled).  Protocols also provide better type checking without
  57.     compromising the flexibility of untyped, dynamically bound objects.
  58.  
  59.         MyClass *obj1 = [MyClass new];
  60.  
  61.         // legal, obj2 conforms to the Archiving protocol.
  62.         id <Archiving> obj2 = obj1;
  63.  
  64.         // illegal, obj1 does not conform to the TargetAction
  65.         // protocol.
  66.         id <TargetAction> obj3 = obj1;
  67.  
  68.  
  69.         
  70.  
  71.  
  72.  
  73. Terminology
  74. ~~~~~~~~~~~
  75. C:        A programming language.
  76. FTP:        File Transfer Protocol.
  77. GNU:        A project making freely available software.
  78. message:    A "call" to an implementation of a method
  79. method:        An implementation of an ObjC "function"
  80. factory method:    A method which creates a new instance of a class
  81. class method:    A method which acts on or with the whole of a class rather
  82.         than an instance of a class.  Often used interchangeably
  83.         with _factory method_, but there is a subtle difference.
  84. instance method:A method witch acts on or with a specific instance of a
  85.         class.
  86. OOP:        Object Oriented Programming
  87. ObjC:        An abbreviation of Objective-C
  88. Object:        The base {class} of Objective-C.
  89. Objective-C:    An Object Oriented programming language extended from
  90.           the C language, and what this whole file is about.
  91.         It is also a registered trademark of The Stepstone
  92.         Corporation.
  93.  
  94.  
  95.  
  96.  
  97. ---
  98. All [**********] designate incompleteness of the FAQ.  If you have any
  99. questions, corrections, comment, suggestions pass them along.  I can be
  100. reached directly at <shirley@fdr.jsc.nasa.gov> or you can post to
  101. the news group (comp.lang.objective-c).
  102.  
  103. Disclaimer:  I am not related to any company or group mentioned above.
  104. This file was created to provide information to interested people, and
  105. not advertizing for anything listed above.
  106.  
  107. gnu ftp site, prep.ai.mit.edu:pub/gnu/etc/DISTRIB
  108.  (prep UK/Europe mirror) src.doc.ic.ac.uk (???)
  109.  (prep Netherlands mirror) ftp.win.tue.nl (131.155.70.100)
  110.  (prep UK mirror) src.doc.ic.ac.uk (146.169.3.7)
  111.  (prep Japan mirror) utsun.s.u-tokyo.ac.jp (133.11.11.11)
  112.  (Australian site) archie.au (IP number may change)
  113.  
  114.  
  115. My list of thanks has gotten a bit long, so instead of leaving
  116.  anyone out, I'll just say thanks to all who have given feedback.
  117. This information is what YOU make it.
  118. ---
  119. --
  120.  Bill Shirley
  121.  shirley@fdr.jsc.nasa.gov
  122. --
  123.     ``One lonesome body,        Bill Shirley
  124.       one lonesome song.        shirley@fdr.jsc.nasa.gov
  125.       No lonesome body,
  126.       no lonesome song.'' - throwing muses
  127. Xref: bloom-picayune.mit.edu comp.lang.objective-c:1011 news.answers:4554
  128. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!olivea!sun-barr!cs.utexas.edu!bcm!aio!fdr!shirley
  129. From: shirley@fdr.uucp (Bill Shirley [CSC])
  130. Newsgroups: comp.lang.objective-c,news.answers
  131. Subject: Objective-C Simple Sample Program - FAQ
  132. Summary: A simple Objective-C program to give a sample of the syntax
  133.     to someone unfamiliar with the language.
  134. Message-ID: <objc-prog_724237201@fdr.jsc.nasa.edu>
  135. Date: 13 Dec 92 09:00:40 GMT
  136. Expires: 26 Jan 1993 09:00:01 GMT
  137. References: <objc_724237201@fdr.jsc.nasa.edu>
  138. Sender: news@aio.jsc.nasa.gov (USENET News System)
  139. Followup-To: comp.lang.objective-c
  140. Organization: nasa-jsc
  141. Lines: 200
  142. Approved: news-answers-request@MIT.Edu
  143. Supersedes: <objc-prog_721077644@fdr.jsc.nasa.edu>
  144.  
  145. Archive-name: Objective-C/sample-program
  146. Last-modified: 1992/11/01
  147. Version: 1.0
  148.  
  149.         A S[ia]mple Objective-C Program
  150.     (a companion to the comp.lang.Objective-C FAQ file)
  151.  
  152. // This is a comment.  Everything to the right of a double slash
  153. // is ignored (until an end of line is reached).
  154.  
  155. /*
  156.  * This is too, that's what superset of ANSI C means; You can do
  157.  *  anything you can do in C in Objective-C.  (not to suggest that
  158.  *  you should, only that you could.)
  159.  */
  160.  
  161. // The first thing we do is bring in some include files, as in
  162. // C.  However, we'll use the "import" statement which guarantees
  163. // that the file isn't included more than once.
  164.  
  165. // <objc/Object.h> is not really needed, because it is #imported
  166. // by the Queue and Stack headers, but we (as object users) don't
  167. // necessarily know that, so it is good practice to #import it
  168. // here.  (When the processer reaches #import <objc/Object.h>
  169. // in the Queue and Stack headers, it will not include it.)
  170.  
  171. #import <stdio.h>
  172. #import <objc/Object.h>
  173. #import "Queue.h"
  174. #import "Stack.h"
  175.  
  176. // GNU gcc for some reason passes moral judgement on the useage
  177. // of #import, but still allows it.  They suggest you use #ifndefs
  178. // in all of your header files to eliminate multiple includes.
  179.  
  180. // That brought in class definitions for Objects, Queues, and
  181. // Stacks.  Queue and Stack are classes of my own construction,
  182. // and I'm not going to go into details here.  You don't need
  183. // to know how they work.  The Object class is the basis for
  184. // all other classes, which is why it gets brought in first.
  185.  
  186. // Classes are the one real extension which Objective C adds to
  187. // C.  A class is a description of a collection of data, like a
  188. // C structure, and the methods by which that data may be accessed
  189. // or manipulated.  Instances of a class are called objects, and
  190. // methods are invoked by sending messages to either the class itself,
  191. // to produce objects, or to those objects.  The recipient of a message
  192. // is called a "receiver".  The form of a message is:
  193. //
  194. //    [receiver method andMaybeSomeArguments]
  195. //
  196. // the receiver and method components are mandatory, as are
  197. // the square brackets surrounding the message.  Additional
  198. // arguments may or may not be present, depending upon the
  199. // method definition.  Messages may appear anywhere a statement
  200. // is allowed in C.
  201.  
  202. // Two simple Class definitions follow.  Both inherit
  203. // directly from the base class "Object".  This gives
  204. // them lots of nice properties, not the least of which
  205. // is the ability to be referenced by any pointer of the
  206. // generic object type "id".  All objects can be pointed
  207. // to by any id variable, and the default return type from
  208. // methods is id.  This allows messages to be embedded in
  209. // other messages, either as receivers or arguments.
  210.  
  211. // An Int object allocates space for a single integer.
  212. // The "report" message causes it to report its value.
  213. // Everything between the @implementation and the @end
  214. // is part of the class definition...
  215.  
  216. @implementation Int: Object    // Int is derived from Object
  217. {
  218.     int value;        // This is the data portion.  Like a struct.
  219. }
  220.  
  221. // The following are the method definitions.  The "+" means this
  222. // is a class method, i.e., a method that deals with classes instead
  223. // on instances.  In this case it is a factory method, or one which
  224. // creates and returns a new instance of a class  The body of the
  225. // method is between braces, like a C function.
  226.  
  227. // Self is a special variable which may only be used within a method
  228. // and means the receiver of the message which invoked this message.
  229. // Super means that when searching for the method for this message
  230. // start in the parent class of the present implementation.  This
  231. // does not, necessarily, have any relation to the value of self.
  232.  
  233. + makeRoomFor: (int) i
  234. {
  235.   id  anInstance;
  236.  
  237.   anInstance  = [super new];
  238.   value = i;
  239.   return anInstance;
  240. }
  241.  
  242. // It is standard for methods that do not need to return any
  243. // special value to instead return self.  This allows for a
  244. // nested syntax of method calls.
  245.  
  246. // The "-" in front of report means that it's an instance method,
  247. // i.e., how a particular object should respond.
  248.  
  249. - report
  250. {
  251.   printf("%4d", value);
  252.   return self;
  253. }
  254.  
  255. @end
  256.  
  257.  
  258. // Same for a Float object, but for the obvious difference that
  259. // it works with floats.
  260. // Note polymorphism -- methods have same names as in the Int class.
  261.  
  262. @implementation Float: Object
  263. {
  264.   float value;
  265. }
  266.  
  267. // Sometimes a factory method is written in the following manner.  This
  268. // is not strictly correct, but since _self_ is a local variable, no
  269. // harm is done.  It is also quite common to see this in code from the
  270. // net, so it is included here.  In this case _self_, which is a class,
  271. // is assigned to return a value from [super new], which is an instance.
  272. // It may even help the compiler optimize if there is no assignment to
  273. // self while in a class method.
  274.  
  275. + makeRoomFor: (float) x
  276. {
  277.   self = [super new];
  278.   value = x;
  279.   return self;
  280. }
  281.  
  282. - report
  283. {
  284.   printf("%4.1f", value);
  285.   return self;
  286. }
  287.  
  288. @end
  289.  
  290. void main()
  291. {
  292.     // First we create instances of "Stack" and "Queue" data structures
  293.  
  294.     id queue = [Queue new];
  295.     id stack = [Stack new];
  296.     int i;
  297.  
  298.     for (i = 5; i > -6; --i)
  299.     {
  300.     // We alternate putting Int's and Floats onto the queue and
  301.     // stack, based on whether "i" is odd or even.  Whatever
  302.     // type goes on the queue, the opposite goes on the stack.
  303.  
  304.     [queue put: (i & 1) ? [Int makeRoomFor: i] : [Float makeRoomFor: i]];
  305.     [stack put: (i & 1) ? [Float makeRoomFor: i] : [Int makeRoomFor: i]];
  306.     }
  307.     while ([queue size] && [stack size])
  308.     {
  309.     // The following illustrates run-time binding.  Will report be
  310.     // invoked for a Float object or an Int object?  We don't know
  311.     // ahead of time, but with run-time binding and polymorphism
  312.     // it works the way we like.  The burden is on the class
  313.     // implementor rather than the class user.  In fact, we
  314.     // could add another class (String?  Complex?) and toss
  315.     // instances onto the Stack and Queue without having to
  316.     // change the following lines at all.
  317.  
  318.     // Both classes, Int and Float, just happen to implement the
  319.     // method 'report'.  They do not need to inherit from some
  320.     // object 'Reportable', only to implement the report method.
  321.     // If one did not implement the method, the message would
  322.     // not be sent.
  323.  
  324.     printf("queue=");    [[[queue get] report] free];
  325.     printf(", stack=");    [[[stack get] report] free];
  326.     putchar('\n');
  327.     }
  328. }
  329.  
  330. ______
  331. If you have any questions, corrections, comment, suggestions pass them
  332. along.  I can be reached directly at <shirley@krakatoa.jsc.nasa.gov> or you
  333. can post to the news group (comp.lang.objective-c)
  334.  
  335. Thanks to Paul J. Sanchez, paul@music.sie.arizona.edu, for writing this
  336. program.
  337. --
  338.  Bill Shirley
  339.  shirley@fdr.jsc.nasa.gov
  340. --
  341.     ``One lonesome body,        Bill Shirley
  342.       one lonesome song.        shirley@fdr.jsc.nasa.gov
  343.       No lonesome body,
  344.       no lonesome song.'' - throwing muses
  345. Xref: bloom-picayune.mit.edu comp.os.os2.misc:43033 comp.os.os2.apps:9294 news.answers:4353
  346. Newsgroups: comp.os.os2.misc,comp.os.os2.apps,news.answers
  347. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!uchinews!ellis!sip1
  348. From: sip1@ellis.uchicago.edu (Timothy F. Sipples)
  349. Subject: OS/2 Frequently Asked Questions Rel. 2.0h (1 of 2)
  350. Message-ID: <1992Dec2.033606.17639@midway.uchicago.edu>
  351. Followup-To: comp.os.os2.misc
  352. Sender: news@uchinews.uchicago.edu (News System)
  353. Supersedes: <1992Oct26.002516.25594@midway.uchicago.edu>
  354. Reply-To: sip1@midway.uchicago.edu
  355. Organization: University of Chicago Computing Organizations
  356. Date: Wed, 2 Dec 1992 03:36:06 GMT
  357. Approved: news-answers-request@mit.edu
  358. Expires: Sat, 30 Jan 1993 23:59:59 GMT
  359. Lines: 800
  360.  
  361. Archive-name: os2-faq/user/part1
  362. Version: 2.0h
  363.  
  364. OS/2 Frequently Asked Questions List: User's Edition
  365. Release 2.0h; December 2, 1992
  366. Compiled by Timothy F. Sipples
  367.  
  368. For changes/suggestions/additions please mail sip1@ellis.uchicago.edu or
  369. T. Sipples, Ctr. for Population Econ., Univ. of Chicago, Chicago, IL,
  370. 60637, U.S.A.  This List may be freely distributed.  Mention of a
  371. product does not constitute an endorsement.  Customers outside the U.S.
  372. should not necessarily rely on 800 telephone numbers, part numbers, or
  373. upgrade policies contained in this List.  Electronic mail addresses are
  374. in Internet form; use addressing appropriate to your mail system.
  375.  
  376. Release Notes:
  377.  
  378. Because of the many loyal fans of the OS/2 FAQ List, I have been named
  379. to the "Team OS/2 Hall of Fame."  Many thanks.
  380.  
  381. For Internet readers, the FAQ List now appears in two messages due to an
  382. increase in length.  I will continue to try and keep it from becoming
  383. too long, however.  Readers should be aware that a Rich Text Format
  384. (RTF) version should accompany this List if you have retrieved it from a
  385. BBS or archive (usually as a ZIP file).  The RTF version includes
  386. revision markings, so you can tell at a glance what has changed since
  387. the last release.  If you did not receive the RTF version, please ask
  388. your system operator to try to obtain the correct package from now on.
  389. You can start with the original distribution points for the FAQ List:
  390. Pete Norloff (OS/2 Shareware BBS, 703-385-4325), Cliff Nadler (IBM
  391. internal VNET), and ftp-os2.nmsu.edu (Internet, anonymous ftp).  (Please
  392. contact me if you would like to volunteer to redistribute the FAQ List
  393. to CompuServe, BIX, or other major networks.  You should be able to
  394. receive Internet mail.  CompuServe, BIX, MCI Mail, and addresses for
  395. most other major networks are acceptable, since gateways exist.  Note
  396. that I cannot entertain requests for subscriptions to a "mailing list.")
  397. An INF version (for use with OS/2's VIEW command) of the FAQ List may be
  398. released in the future (to replace the RTF version) so you will want to
  399. make sure you are getting the whole package.
  400.  
  401. The OS/2 FAQ List: Programmer's Edition should be available from the
  402. same source as this User's Edition.  It is maintained by my Internet
  403. colleague Barry Jaspan (bjaspan@athena.mit.edu).  Send your suggestions
  404. on programming questions to him.  Before long we may have a Networking
  405. Edition as well.
  406.  
  407. Questions addressed herein:
  408.  
  409. (1)    What is OS/2?
  410. (2)    What are the differences between versions?
  411. (3)    What is Extended Services?
  412. (4)    How good is OS/2 2.0's DOS and Windows compatibility?
  413. (5)    Where can I buy OS/2, and how much does it cost?
  414. (6)    What hardware do I need to run IBM OS/2 2.0?  Do I need a PS/2?
  415. (7)    What applications are available for OS/2?
  416. (8)    Where can I obtain OS/2 shareware and freeware?
  417. (9)    I am having trouble installing OS/2 2.0.  What should I do?
  418. (10)    Will OS/2 2.0 work with my SuperVGA adapter?
  419. (11)    Will OS/2 2.0 work with my printer?
  420. (12)    How do I access HPFS partitions on my hard drive without booting
  421.     from the hard drive?  I'm getting error messages now -- how do I
  422.     "repair" my hard disk?
  423. (13)    I can't install OS/2 from Drive B.  What's wrong?
  424. (14)    Is there a Norton Utilities for OS/2?
  425. (15)    Sometimes OS/2 2.0 will freeze when I run an application.  What do
  426.     I do?
  427. (16)    How can I get answers to my OS/2 questions?
  428. (17)    Why should I use HPFS?  What does it offer me?  Does it work with
  429.     DOS?
  430. (18)    I'm a Unix wizard.  How do I make OS/2 resemble Unix?
  431. (19)    I prefer Windows.  How do I make OS/2 2.0 resemble Windows (or
  432.     OS/2 1.3)?
  433. (20)    I would like to set up an OS/2 BBS.  What is available?
  434. (21)    Can I use COM3 and COM4 in OS/2 2.0?
  435. (22)    How do I start a background process from the OS/2 command line?
  436. (23)    What are CSDs, how do I tell which I have, and where do I get
  437.     them?
  438. (24)    How do I add new Adobe Type Manager typefaces?
  439. (25)    How do I tweak OS/2 2.0 for maximum performance?
  440. (26)    What networking products are available for OS/2 2.0?
  441. (27)    Should I worry about viruses when running OS/2 2.0?
  442. (28)    Are there any clever tricks that apply to OS/2 2.0?
  443. (29)    What do I need for OS/2 multimedia applications?
  444. (30)    How do I measure OS/2 performance and memory usage?
  445. (31)    What can I do to promote OS/2?
  446. (32)    My background bitmap does not display correctly.  What's wrong?
  447. (33)    What is the best way to partition my hard disk for OS/2?
  448.  
  449. ----------------------------------------------------------------------
  450.  
  451. (1)    What is OS/2?
  452.  
  453. OS/2 is an advanced operating system for PCs and PS/2s with an 80286
  454. processor or better.  It was codeveloped by Microsoft and IBM and
  455. envisioned as the successor to DOS.
  456.  
  457. It was designed from the ground up with preemptive multitasking and
  458. multithreading in mind.  It also protects applications from one another
  459. (a single misbehaved program will not typically disrupt the entire
  460. system), supports all addressable physical RAM, and supplies virtual
  461. memory to applications as requested, breaking DOS's 640K barrier.
  462.  
  463. As shipped, it does not support multiuser operation, although third
  464. parties have grafted multiuser capabilities onto the base operating
  465. system.  Remote-OS (The Software Lifeline, 407-994-4466), OS2YOU
  466. (shareware; see Question 8), Citrix (Citrix Systems, 305-755-0559), and
  467. PolyMod2 (MemSoft) are four such products.  PC/DACS (Pyramid, 203-257-
  468. 4223) offers security (for multiple users, one at a time, in a lab
  469. setting for example).
  470.  
  471. ------------------------------
  472.  
  473. (2)    What are the differences between versions?
  474.  
  475. IBM OS/2 Version 2.0 (CSD Level 06050, see Question 23) will run only on
  476. machines with an 80386SX processor or better.  IBM is developing OS/2
  477. (and its Intel and non-Intel-based successors) independently but is
  478. involving third party PC manufacturers in its testing.  Improvements
  479. include an object-oriented Workplace Shell (WPS); a multiple operating
  480. system boot mechanism; better DOS and Windows support (see Question 4);
  481. new 32-bit programming interfaces; support for more than 16 MB of
  482. physical RAM (on all systems with appropriate BIOS support, except those
  483. which must rely on 24-bit DMA for disk access, e.g. AT bus systems with
  484. Adaptec 154x SCSI adapters); and more third party device drivers.  OS/2
  485. 1.x applications, unmodified, still run under OS/2 2.0.
  486.  
  487. IBM OS/2 Version 1.3 is the last release of OS/2 to operate on PCs with
  488. 80286 CPUs.  This version introduced built-in Adobe Type Manager (ATM),
  489. providing scalable typefaces for screen and printer.  Procedures
  490. Language/2 (REXX), a powerful batch-oriented programming language,
  491. became a part of Standard Edition with this release.  (A few OEMs are
  492. shipping Microsoft OS/2 Version 1.3, but Microsoft has all but abandoned
  493. OS/2 development.)
  494.  
  495. OS/2 Version 1.2 was the first to incorporate the High Performance File
  496. System (HPFS).  With this release IBM OS/2 added a dual boot mechanism
  497. and IBM Extended Edition introduced REXX.
  498.  
  499. OS/2 Version 1.1 was the first to include the Presentation Manager (PM)
  500. GUI/API.  Microsoft OEM versions added a dual boot mechanism with this
  501. release.
  502.  
  503. OS/2 Version 1.0, introduced in 1987, was the first release of OS/2.
  504. Task switching was accomplished using a character-based shell and
  505. limited DOS compatibility was provided.
  506.  
  507. ------------------------------
  508.  
  509. (3)    What is Extended Services?
  510.  
  511. Prior to Version 2.0, IBM offered two separate packages with each
  512. release of OS/2: Standard Edition and Extended Edition.  Extended
  513. Edition included extra, bundled software products: the Communications
  514. Manager (for communication with IBM mainframes, minicomputers, and other
  515. hosts), Database Manager (a full, network aware, relational database),
  516. and LAN Requester.
  517.  
  518. IBM has now unbundled the Extended Edition features, dropped LAN
  519. Requester from the package (now available separately, with IBM's LAN
  520. Server), updated it for OS/2 2.0, and renamed it Extended Services 1.0.
  521. ES, by itself, no longer includes the base operating system as Extended
  522. Edition once did.
  523.  
  524. This new arrangement makes it easier to update the base operating system
  525. with CSDs (see Question 23).  And now ES 1.0 will run under OS/2 1.3
  526. Standard Edition as well as OS/2 2.0.  Also, ES 1.0, like OS/2 2.0
  527. itself, is designed to operate on both IBM and non-IBM systems (see
  528. Question 6).
  529.  
  530. ------------------------------
  531.  
  532. (4)    How good is OS/2 2.0's DOS and Windows compatibility?
  533.  
  534. OS/2 1.x justifiably earned a reputation for poor DOS compatibility.
  535. Since it was hampered by the 80286, it could not run more than one DOS
  536. application at a time.
  537.  
  538. The situation has changed dramatically with OS/2 2.0.  Version 2.0
  539. preemptively multitasks DOS and Windows (real and standard mode)
  540. applications in separate, protected sessions, without purchasing either
  541. environment.
  542.  
  543. OS/2 2.0 provides a complete DOS emulation equivalent to DOS 5.0.  The
  544. operating system can provide each DOS application with up to 32 MB of
  545. EMS 4.0 (expanded memory), 16 MB of XMS 2.0 (extended memory), and/or
  546. 512 MB of DPMI 0.9 (DOS Protected Mode Interface extended memory), all
  547. from its pool of physical and/or virtual memory (meaning you do not have
  548. to have as much RAM in your system as your applications request).  These
  549. limits are in addition to the up to 730K free conventional memory
  550. supplied to each DOS application, even after mouse and network drivers
  551. are loaded.  As in DOS 5.0, DOS code and device drivers may be loaded
  552. into high memory.  A 386 memory manager like QEMM is not needed -- these
  553. features are provided by OS/2 2.0 directly.
  554.  
  555. The DOS emulation allows customization of device driver sets -- each DOS
  556. application shares a systemwide CONFIG.SYS and the equivalent of its own
  557. CONFIG.SYS.  Also, there is a systemwide AUTOEXEC.BAT file; batch
  558. commands particular to each DOS application can be invoked using
  559. separate, application-specific batch files.  And many DOS Settings are
  560. provided to fine tune each DOS/Windows application's behavior (e.g.
  561. IDLE_SENSITIVITY).  Most of the popular DOS/Windows applications on your
  562. hard disk will be migrated automatically when you install OS/2 2.0.
  563.  
  564. In addition, OS/2 2.0 will boot one or more specific versions of DOS in
  565. separate sessions, to assist in running particularly difficult
  566. applications (e.g. DOS networks, MSCDEX).  So, for example, it is
  567. possible to multitask DOS 3.3, DOS 4.0, DOS 5.0, emulated DOS, and
  568. Desqview running atop DOS, all in separate sessions, either windowed or
  569. full screen, all with the same and/or separate device drivers, TSRs,
  570. environment variables, etc.  DOS boot images may be stored on a hard
  571. disk.  These procedures are described in the online Command Reference
  572. (under VMDISK) and in the Installation Guide, Appendix E.
  573.  
  574. Standard graphics modes (generally up to the resolution of the desktop;
  575. see Question 10) are supported in DOS windows, as are selectable text
  576. mode fonts.  Cut/paste to/from windowed DOS applications is supported
  577. (to/from other DOS, OS/2, and Windows applications), including graphics
  578. cut/paste.  Theoretically, OS/2 2.0 will run up to 240 simultaneous
  579. DOS/Windows sessions; the practical maximum depends on system resources.
  580.  
  581. OS/2 2.0 will, in fact, run virtually all DOS applications in existence,
  582. including notorious ones such as Microsoft Flight Simulator, Wing
  583. Commander, Maple, MatLab (Ver. 3.5k or later), and others.  Those that
  584. do not run generally fall into the following categories:
  585.  
  586. (a)  Programs that use Virtual Control Program Interface (VCPI) memory
  587. extenders or other extenders which require direct access to 80386
  588. control registers.  Since such applications are also all but
  589. incompatible with Windows, most vendors have updates for DPMI
  590. compatibility;
  591.  
  592. (b)  Applications which attempt to directly address the physical sectors
  593. of an OS/2 managed nonremoveable hard disk drive.  Such programs include
  594. UnErase in Norton Utilities.  Fortunately OS/2 2.0 has a built-in
  595. UnDelete feature which is more robust than Norton's approach.  (Consult
  596. the online Command Reference for information on how to enable UNDELETE);
  597.  
  598. (c)  Timing sensitive DOS applications.  Certain DOS programs that
  599. generate digitized sound through the PC's internal speaker may have
  600. distorted sound.  High speed, real time data collection may be
  601. compromised.  These problems can often be minimized or even eliminated
  602. using OS/2 2.0's DOS Settings.
  603.  
  604. (d)  Certain DOS programming debuggers.  DOS applications running under
  605. OS/2 2.0 are not permitted to access debug registers DR0-DR7 from a DOS
  606. session.  Also, DOS debuggers will not be able to set hardware
  607. breakpoints, and all read/write operations to debug registers in virtual
  608. 8086 mode will be ignored.
  609.  
  610. Generally DOS backup programs will work under OS/2 2.0, but they may not
  611. capture some OS/2 data (especially extended attributes) on the hard disk
  612. without the assistance of utilities such as EABackup (available from
  613. sources listed in Question 8).  OS/2 backup tools are available, notably
  614. IBM's PMTape and PS2Tape (for IBM and Irwin tape systems), Sytos Plus
  615. (Sytron, 508-898-0100), EZTape (Irwin, 313-930-9000), DMS/Intelligent
  616. Backup (Sterling, 916-635-5535), FileSafe (Mountain, 408-438-2665),
  617. KeepTrack Plus (Finot, 800-748-6480), NovaBack (NovaStor, 818-707-9900),
  618. OBackup (from sources listed in Question 8), and MaynStream (Maynard,
  619. 407-263-3500).  The OS/2 BACKUP utility is best used from an OS/2
  620. diskette boot (see Question 12).  DOS-based disk caching software is not
  621. required since OS/2 includes a built-in, highly configurable, efficient
  622. disk cache.
  623.  
  624. DOS programs running under OS/2 2.0 are extremely fast.  A single DOS
  625. application (no other applications open) running full screen under OS/2
  626. 2.0 typically achieves 95-97% of the performance it would have under
  627. native DOS.  If the DOS application performs any disk I/O it can
  628. actually operate up to three times faster than it would if running under
  629. native DOS.
  630.  
  631. If pure DOS is absolutely required, OS/2 2.0 includes a utility called
  632. the Boot Manager.  The Boot Manager can provide a listing of all the
  633. operating systems available on the system and will allow selection of
  634. any one at startup, with a default after timeout.  The OS/2 1.x DualBoot
  635. method is still available as well.  Consult the Installation Guide for
  636. instructions on how to use Boot Manager or DualBoot.  Note that OS/2 2.0
  637. need not be installed on Drive C -- it can reside on other volumes.
  638.  
  639. Compatibility with Windows, a popular DOS extender, is provided by Win-
  640. OS/2, an environment based on Microsoft's Windows source code.  It runs
  641. Windows 2.x and 3.0 real mode and standard mode applications under OS/2
  642. 2.0, either on a full screen Windows desktop (with the familiar Program
  643. Manager and one or more Windows applications) or "seamlessly," alongside
  644. OS/2 applications on the WPS desktop.  "Seamless" operation is available
  645. in VGA, Tseng 4000 SuperVGA, and XGA resolutions with OS/2 2.0 as it
  646. ships; see Question 10 for information on third party drivers.
  647.  
  648. Several icon conversion utilities, available from sources listed in
  649. Question 8, can convert Windows icons for use by the OS/2 Icon Editor
  650. and/or OS/2-specific programs.  (No conversion is necessary if the icons
  651. are to be used with Windows programs running under OS/2 2.0.)
  652.  
  653. OS/2 2.0 directly provides Windows enhanced mode features save one:
  654. services included in WINMEM32.DLL.  Windows applications which utilize
  655. this DLL (e.g. Mathematica 2.0, Omnipage Professional 1.0) will not run
  656. under OS/2 2.0.  Fortunately the number of WINMEM32 applications is few,
  657. and apparently the vendors of such applications will be shipping OS/2
  658. 2.0 compatible updates.
  659.  
  660. Windows applications are well integrated into the overall OS/2 WPS
  661. environment with DDE and Clipboard hooks, and OLE 1.0 is supported among
  662. Windows applications.  ATM for Win-OS/2 comes with OS/2 2.0 (see
  663. Question 24).  Windows screen (for a full screen desktop) and printer
  664. device drivers will work under Win-OS/2.  Such notorious Windows
  665. applications as Word, Norton Desktop (save portions described above),
  666. Toolbook, and After Dark work fine under Win-OS/2.  Even the Windows
  667. Multimedia Extensions (and programs which utilize them) operate under
  668. Win-OS/2.  (For information on the OS/2 2.0 multimedia extensions see
  669. Question 29.)
  670.